Lab 09 - Vision based SLAM: ORB-SLAM3

Robotics II

Poznan University of Technology, Institute of Robotics and Machine Intelligence

Laboratory 9: ORB-SLAM3 - Simultaneous localization and mapping using camera sensor

Back to the course table of contents

During the course, we perform visual SLAM (Simultaneous localization and mapping) for the racecar from the Formula Student Driverless Simulator. This time, we want to show you ORB-SLAM3 - high-speed, robust, and accurate trajectory estimation in many environments. It is currently one of the most robust and efficient vision SLAM systems.

The full code of ORB-SLAM3 with instructions is available on Github. During this class, the prepared Docker container with a full ORB_SLAM3 environment will be used.

Step 0: (do this if arm/image04 image not exist in docker images list)

wget  "https://chmura.put.poznan.pl/s/T98vgBxYTNZqgHO/download" -O arm.tar.gz
docker load < arm.tar.gz
xhost +local:root

Step 1: Run container with prepared ORB_SLAM3 environment

docker run \
  -it --gpus all --privileged --network=host \
  --env="DISPLAY=$DISPLAY" \
  --env="QT_X11_NO_MITSHM=1" \
  --env="NVIDIA_DISABLE_REQUIRE=1" \
  --env="XAUTHORITY=$XAUTH" \
  --env="NVIDIA_VISIBLE_DEVICES=all" \
  --env="NVIDIA_DRIVER_CAPABILITIES=all" \
  --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
  --volume="$XAUTH:$XAUTH" \
  --name=visual_slam \
  arm/image04

Step 2: Prepare algorithm config

TASK

Download the ORB_SLAM3 config:

wget "https://raw.githubusercontent.com/PUTvision/RoboticsII-FSDS/orb-slam3/FSDS.yaml"

Based on the information below and your knowledge, fill in the missing values. Tips:
* <WIDTH> - integer, the width of an image * <HEIGHT> - integer, the height of an image * <FX> - float, the focal length in pixel-related units (here <FX> and <FY> are the same); in this case 530.0 * <CX> and <CY> - floats, are principal points (that are usually at the image center) * <BF> - float, the multiplication of the camera base (the dimension between cameras, in this case base is 0.2 meters) and <FX>.

Step 3: Run the ORB_SLAM3 alghoritm:

rosrun ORB_SLAM3 Stereo /ORB_SLAM3/Vocabulary/ORBvoc.txt FSDS.yaml true <camera_topic_left> <camera_topic__right>
rosbag play -r 0.25 vision_slam.bag

As a result, upload the plot and screenshot from the ORB_SLAM3 GUI to the eKursy platform.